package com.bjb.vr.common.constant;

/**
 * @description: Token常量类
 * @author: HuJingBo
 * @time: 2022/3/3 14:42
 */
public class TokenConstants {

    /**
     * 令牌签发者
     */
    public static final String ISSUER = "BJB-VR";
    /**
     * 令牌自定义参数
     */
    public static final String TOKEN_USERNAME = "username";
    /**
     * 租户ID
     */
    public static final String TENANT_ID = "tenantId";
    /**
     * 登录类型
     */
    public static final String LOGIN_TYPE = "loginType";
    /**
     * 设备令牌自定义参数
     */
    public static final String TOKEN_UDID = "udid";
    /**
     * 令牌自定义标识
     */
    public static final String AUTHORIZATION = "Authorization";
    /**
     * 令牌前缀
     */
    public static final String PREFIX = "XR-Plaform";
    /**
     * 令牌秘钥
     */
    public static final String SECRET = "abcdefghijklmnopqrstuvwxyz123456";
    /**
     * 缓存有效期
     */
    public final static long EXPIRATION = 60 * 5;
    /**
     * 缓存刷新时间
     */
    public final static long REFRESH_TIME = 60 * 5;
    /**
     * 权限缓存前缀
     */
    public final static String LOGIN_IDENTIFY_KEY = "login_identify:";
    /**
     * 平台缓存前缀
     */
    public final static String PLATFORM_TOKEN_KEY = "platform_tokens:";
    /**
     * 平台缓存值
     */
    public final static String PLATFORM_MAP_KEY = "platform";
    /**
     * 权限缓存前缀
     */
    public final static String LOGIN_TOKEN_KEY = "login_tokens:";
    /**
     * 权限缓存token值
     */
    public final static String TOKEN_MAP_KEY = "token";
    /**
     * 权限缓存前缀--运营端
     */
    public final static String LOGIN_OPT_TOKEN_KEY = "login_opt_tokens:";
    /**
     * 权限缓存tokenID
     */
    public final static String REFRESH_TOKEN_MAP_KEY = "refreshTokenId";
    /**
     * 请求头中令牌不能为空
     */
    public final static String EMPTY_TOKEN_ERROR = "请求头中Token不能为空";
    /**
     * 令牌已过期
     */
    public final static String EXPIRE_TOKEN_ERROR = "Token失效过期,请重新登录";
    /**
     * 令牌验证失败
     */
    public final static String VALIDATE_TOKEN_ERROR = "Token验证失败,请重新登录";
    /**
     * 令牌签名验证失败
     */
    public final static String VALIDATE_TOKEN_SIGNATURE_ERROR = "Token签名验证失败,请重新登录";
}
